package com.gisocn.onemap.greendao;

import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import com.gisocn.onemap.model.Dirs;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.internal.DaoConfig;

/* loaded from: classes.dex */
public class DirsDao extends AbstractDao<Dirs, Long> {
    public static final String TABLENAME = "DIRS";

    /* loaded from: classes.dex */
    public static class Properties {
        public static final Property Id = new Property(0, Long.TYPE, "id", true, "_id");
        public static final Property DIR_ID = new Property(1, String.class, "DIR_ID", false, "DIR__ID");
        public static final Property NAME = new Property(2, String.class, "NAME", false, "NAME");
        public static final Property SINDEX = new Property(3, Integer.TYPE, "SINDEX", false, "SINDEX");
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final boolean isEntityUpdateable() {
        return true;
    }

    public DirsDao(DaoConfig daoConfig) {
        super(daoConfig);
    }

    public DirsDao(DaoConfig daoConfig, DaoSession daoSession) {
        super(daoConfig, daoSession);
    }

    public static void createTable(Database database, boolean z) {
        String str = z ? "IF NOT EXISTS " : "";
        database.execSQL("CREATE TABLE " + str + "\"DIRS\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,\"DIR__ID\" TEXT,\"NAME\" TEXT,\"SINDEX\" INTEGER NOT NULL );");
    }

    public static void dropTable(Database database, boolean z) {
        StringBuilder sb = new StringBuilder();
        sb.append("DROP TABLE ");
        sb.append(z ? "IF EXISTS " : "");
        sb.append("\"DIRS\"");
        database.execSQL(sb.toString());
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(DatabaseStatement databaseStatement, Dirs dirs) {
        databaseStatement.clearBindings();
        databaseStatement.bindLong(1, dirs.getId());
        String dir_id = dirs.getDIR_ID();
        if (dir_id != null) {
            databaseStatement.bindString(2, dir_id);
        }
        String name = dirs.getNAME();
        if (name != null) {
            databaseStatement.bindString(3, name);
        }
        databaseStatement.bindLong(4, dirs.getSINDEX());
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(SQLiteStatement sQLiteStatement, Dirs dirs) {
        sQLiteStatement.clearBindings();
        sQLiteStatement.bindLong(1, dirs.getId());
        String dir_id = dirs.getDIR_ID();
        if (dir_id != null) {
            sQLiteStatement.bindString(2, dir_id);
        }
        String name = dirs.getNAME();
        if (name != null) {
            sQLiteStatement.bindString(3, name);
        }
        sQLiteStatement.bindLong(4, dirs.getSINDEX());
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Long readKey(Cursor cursor, int i) {
        return Long.valueOf(cursor.getLong(i + 0));
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Dirs readEntity(Cursor cursor, int i) {
        long j = cursor.getLong(i + 0);
        int i2 = i + 1;
        String string = cursor.isNull(i2) ? null : cursor.getString(i2);
        int i3 = i + 2;
        return new Dirs(j, string, cursor.isNull(i3) ? null : cursor.getString(i3), cursor.getInt(i + 3));
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public void readEntity(Cursor cursor, Dirs dirs, int i) {
        dirs.setId(cursor.getLong(i + 0));
        int i2 = i + 1;
        dirs.setDIR_ID(cursor.isNull(i2) ? null : cursor.getString(i2));
        int i3 = i + 2;
        dirs.setNAME(cursor.isNull(i3) ? null : cursor.getString(i3));
        dirs.setSINDEX(cursor.getInt(i + 3));
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final Long updateKeyAfterInsert(Dirs dirs, long j) {
        dirs.setId(j);
        return Long.valueOf(j);
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public Long getKey(Dirs dirs) {
        if (dirs != null) {
            return Long.valueOf(dirs.getId());
        }
        return null;
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public boolean hasKey(Dirs dirs) {
        throw new UnsupportedOperationException("Unsupported for entities with a non-null key");
    }
}
